import request from "@/request/index.js";

export const survey = {
	//抢单大厅  的任务列表
	getSurveyTasklist(params = {}) {
		return request(
			`/front/broker/survey/page?lng=${params.lng}&lat=${params.lat}&sortType=${params.sortType}&landlordType=${params.landlordType}&pageNum=${params.pageNum}&pageSize=${params.pageSize}&searchValue=${params.searchValue}`,
			'get', null)
	},
	// 抢单保存
	pickTask(data) {
		return request('/front/broker/survey/pickTask?taskId=' + data.taskId, 'post')
	},

	// 经纬度保存
	insertAppLoaction(data) {
			return request('/front/media/setApplocation', 'post',data)
	},
	// 我的任务列表
	myEnsurelask(params = {}) {                    
		return request(`/front/broker/survey/myEnsureTask?pageNum=${params.pageNum}&pageSize=${params.pageSize}`,
			'get', null)
	},
	// 确认/取消任务
	ensure(data) {
		return request(`/front/broker/survey/ensure?id=${data.id}&ensure=${data.ensure}`, 'post')
	},
	// 任务详情
	taskDetail(data) {
		return request(`/front/broker/survey/taskDetail?id=${data.id}`, 'post')
	},
	// 补充勘察
	check(data) {
		return request(`/front/broker/survey/check`, 'post', data)
	},
	// 抢单记录
	seizelist(params) {
		return request(
			`/front/broker/survey/taskLog?pageNum=${params.pageNum}&pageSize=${params.pageSize}&lng=${params.lng}&lat=${params.lat}`,
			'post', null)
	},
	//  新增媒体资源列表
	addMedia(data) {
		return request(`/front/broker/media/all`, 'post', data)
	},
	//房源属性
	labelList() {
		return request(
			`/front/lable/list`,
			'get', null)
	},
}